﻿using System;
using System.Drawing;
using System.Collections.Generic;
using System.Windows.Forms;
using Classifier;

namespace WebTempGen
{
    static class Driver
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            WebSiteRetriever wsr = new WebSiteRetriever();
            List<WebSiteRetriever.WSRPage> webpages = wsr.GetWebsites("democratic party", 100, true);

            NaiveBayes classifier = new NaiveBayes();
            ColorSchemeExtractor extractor = new ColorSchemeExtractor();

            foreach (WebSiteRetriever.WSRPage page in webpages)
            {
                ColorScheme scheme = extractor.Extract(page);
                classifier.setWebElement(scheme);
                // Write the Bayes probability P(feature|Class) to the database.
                classifier.DetermineProbabilities(); 
            }
        }
    }
}
